import VueRouter from "vue-router";
window.Vue.use(VueRouter)
const routes = [
  {
    name: 'root',
    path: '/',
    redirect: "/paper-parse-template/list",
  },
  {
    name: 'parentPaper',
    path: "/parentPaper",
    redirect: "/paper",
    component: () => import("@/views/sheet/paperParent.vue"),
    children: [
      {
        name: "/paper-parse-template/list",
        path: "/paper-parse-template/list",
        component: () => import("@/views/sheet/parseList.vue"),
        meta: {
          parentIndex: "1"
        }
      },
      {
        path: '/uploadPhotos/parent',
        name: '/uploadPhotos/parent',
        component: () => import('@/views/sheet/uploadPhotosParent.vue'),
        redirect: '/uploadPhotos/parent/uploadPhotos',
        children: [
          {
            path: '/uploadPhotos/parent/uploadPhotos',
            component: () => import("@/views/sheet/uploadPhotos.vue"),
            meta: {
              uploadIndex: '1',
              parentIndex: "2"
            }
          }
        ]
      },
      {
        path: '/uploadPhotos/tempImages',
        name: '/uploadPhotos/tempImages',
        component: () => import("@/views/sheet/uploadImages.vue"),
        meta: {
          uploadIndex: '1',
          parentIndex: "3"
        }
      },
    ]
  }
]
const router = new VueRouter({
  mode: "hash",
  base: "/sheet-front/",
  routes,
});
export default router;
